//
// IRQAction.h
// Usage: "irq action" routine base class, all irq action class should derive
//        from this class
// Create Date: 2009-02-17
// Creator: MaJiuyue
//
#ifndef _IRQACTION_H_
#define _IRQACTION_H_

#include "list.h"
#include "type.h"

class IRQAction : public list_head<IRQAction>
{
public:
	virtual void operator() (u32 irq, regs_t *regs){};
	virtual bool for_each_irqaction(u32 irq, regs_t *regs)
	{
		for (IRQAction *pos = this->next; pos != this; pos = pos->next)
			(*pos)(irq, regs);
		return true;
	}
};


#endif

